﻿using System;
using UnityEngine;

namespace Gameplay.CharacterFramework
{ 
    public abstract class CoreComponent : MonoBehaviour
    {
        protected ComponentManager _componentManager;
        protected virtual void Awake() 
        {
            _componentManager = transform.parent.GetComponent<ComponentManager>();

            if (_componentManager == null) { Debug.LogError("There is no ComponentManager on the parent"); }

            _componentManager.AddComponent(this);
        }

        public virtual void LogicUpdate() {}

        public virtual void PhysicsUpdate() {}
        
   
    }
}
